Optimal. Leaf size=74 \[ -\frac {b e n \log (d+e x)}{f (d f-e g)}-\frac {a+b \log \left (c (d+e x)^n\right )}{f (g+f x)}+\frac {b e n \log (g+f x)}{f (d f-e g)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {2459, 2442, 36,
31} \begin {gather*} -\frac {a+b \log \left (c (d+e x)^n\right )}{f (f x+g)}-\frac {b e n \log (d+e x)}{f (d f-e g)}+\frac {b e n \log (f x+g)}{f (d f-e g)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 36
Rule 2442
Rule 2459
Rubi steps
\begin {align*} \int \frac {a+b \log \left (c (d+e x)^n\right )}{\left (f+\frac {g}{x}\right )^2 x^2} \, dx &=\int \frac {a+b \log \left (c (d+e x)^n\right )}{(g+f x)^2} \, dx\\ &=-\frac {a+b \log \left (c (d+e x)^n\right )}{f (g+f x)}+\frac {(b e n) \int \frac {1}{(d+e x) (g+f x)} \, dx}{f}\\ &=-\frac {a+b \log \left (c (d+e x)^n\right )}{f (g+f x)}+\frac {(b e n) \int \frac {1}{g+f x} \, dx}{d f-e g}-\frac {\left (b e^2 n\right ) \int \frac {1}{d+e x} \, dx}{f (d f-e g)}\\ &=-\frac {b e n \log (d+e x)}{f (d f-e g)}-\frac {a+b \log \left (c (d+e x)^n\right )}{f (g+f x)}+\frac {b e n \log (g+f x)}{f (d f-e g)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 57, normalized size = 0.77 \begin {gather*} \frac {-\frac {a+b \log \left (c (d+e x)^n\right )}{g+f x}+\frac {b e n (\log (d+e x)-\log (g+f x))}{-d f+e g}}{f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.31, size = 354, normalized size = 4.78
method | result | size |
risch | \(-\frac {b \ln \left (\left (e x +d \right )^{n}\right )}{f \left (f x +g \right )}-\frac {-i \pi b e g \,\mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}+i \pi b d f \,\mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}+i \pi b e g \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )-i \pi b d f \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )-i \pi b e g \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}-i \pi b d f \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}+i \pi b d f \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}+i \pi b e g \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}-2 \ln \left (-f x -g \right ) b e f n x +2 \ln \left (e x +d \right ) b e f n x -2 \ln \left (-f x -g \right ) b e g n +2 \ln \left (e x +d \right ) b e g n +2 \ln \left (c \right ) b d f -2 \ln \left (c \right ) b e g +2 a d f -2 a e g}{2 \left (f x +g \right ) f \left (d f -e g \right )}\) | \(354\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 90, normalized size = 1.22 \begin {gather*} b n {\left (\frac {\log \left (f x + g\right )}{d f^{2} - f g e} - \frac {\log \left (x e + d\right )}{d f^{2} - f g e}\right )} e - \frac {b \log \left ({\left (x e + d\right )}^{n} c\right )}{f^{2} x + f g} - \frac {a}{f^{2} x + f g} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 99, normalized size = 1.34 \begin {gather*} -\frac {a d f - a g e - {\left (b f n x + b g n\right )} e \log \left (f x + g\right ) + {\left (b f n x e + b d f n\right )} \log \left (x e + d\right ) + {\left (b d f - b g e\right )} \log \left (c\right )}{d f^{3} x + d f^{2} g - {\left (f^{2} g x + f g^{2}\right )} e} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: NotImplementedError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 6.01, size = 111, normalized size = 1.50 \begin {gather*} \frac {b f n x e \log \left (f x + g\right ) - b f n x e \log \left (x e + d\right ) + b g n e \log \left (f x + g\right ) - b d f n \log \left (x e + d\right ) - b d f \log \left (c\right ) + b g e \log \left (c\right ) - a d f + a g e}{d f^{3} x - f^{2} g x e + d f^{2} g - f g^{2} e} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.90, size = 84, normalized size = 1.14 \begin {gather*} -\frac {a}{x\,f^2+g\,f}-\frac {b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )}{f\,\left (g+f\,x\right )}+\frac {b\,e\,n\,\mathrm {atan}\left (\frac {e\,g\,2{}\mathrm {i}+e\,f\,x\,2{}\mathrm {i}}{d\,f-e\,g}+1{}\mathrm {i}\right )\,2{}\mathrm {i}}{f\,\left (d\,f-e\,g\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________